﻿


CREATE PROCEDURE [dbo].[proc_Department_GetList_Company]
	(
	@CompanyId int
	)
AS
	Select
	Id,
	ParentId,
	DName,
	Sort,
	CompanyId,bmbh,
	IsNull(ProtectCount,0) as ProtectCount,
	IsNull(ProtectDays,0) as ProtectDays,
	IsNull(ApplyCount,0) as ApplyCount,
	ISNULL(TrackCount,0) AS TrackCount,
	ISNULL(TrackDays,0) AS TrackDays
	From Department Where CompanyId=@CompanyId Order by Sort
	RETURN


